﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DTO;
using DAO;
using System.Data.SqlClient;
using System.Data;
using System.Windows.Forms;
using System.Threading;

namespace BUS
{
    public class ChiTietPhieuComBUS
    {
        public string ThemKhachHang(ChiTietPhieuComDTO ctpc)
        {
            ChiTietPhieuComDAO ctpcDAO = new ChiTietPhieuComDAO();
            return ctpcDAO.ThemChiTietPhieuCom(ctpc);
        }
        public string ThemChiTietPhieuCom2(DataGridView dtg)
        {
            ChiTietPhieuComDAO ctpcDAO = new ChiTietPhieuComDAO();
            return ctpcDAO.ThemChiTietPhieuCom2(dtg);
        }
        public string ThemChiTietPhieuCom2(DataGridView dtg, int chedo)
        {
            ChiTietPhieuComDAO ctpcDAO = new ChiTietPhieuComDAO();
            return ctpcDAO.ThemChiTietPhieuCom2(dtg, chedo);
        }
        public List<ChiTietPhieuComDTO> LayDanhSachCPPCTheoMa(int maCTPC)
        {
            ChiTietPhieuComDAO ctpcDAO = new ChiTietPhieuComDAO();
            return ctpcDAO.LayDanhSachCPPCTheoMa(maCTPC);
        }
    }
}
